package ${controllerPackage}.${prefix}.response;

import cn.jg.framework.common.bean.Converter;
import ${modelPackage}.${prefix}.${modelName};
import lombok.Data;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
<#list importList as import>
import ${import};
</#list>

/**
 * Created by ${author} on ${date}.
 */
@Data
public class ${modelName}FoundResponse implements Converter<${modelName}, ${modelName}FoundResponse> {
<#assign sysFields=["createTime","updateTime","createUserId","updateUserId","companyId","languageCode","deleteFlag"]>
<#list columnInfoList as col>
    <#if !sysFields?seq_contains(col.modelColumnName)>

    <#if col.comment?length gt 1>
    /**
     * ${col.comment}
     */
    </#if>
    private ${col.javaType} ${col.modelColumnName};
    </#if>
</#list>

    @Override
    public ${modelName}FoundResponse convert(${modelName} ${modelNameLowerCamel}) {
        ${modelName}FoundResponse response = ${modelName}Mapper.INSTANCE.convert(${modelNameLowerCamel});
        return response;
    }

    @Mapper
    interface ${modelName}Mapper {
        ${modelName}Mapper INSTANCE = Mappers.getMapper(${modelName}Mapper.class);

        ${modelName}FoundResponse convert(${modelName} ${modelNameLowerCamel});
    }
}